﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace BuildRunner
{
	/// <summary>
	/// dlgParam.xaml の相互作用ロジック
	/// </summary>
	public partial class dlgParam : Window
	{
		public dlgParam()
		{
			InitializeComponent();
		}

		public Dictionary<string, string> Param { get; set; }
		
		List<ParamItem> m_Param = new List<ParamItem>();
		class ParamItem
		{
			public string Key { get; set; }
			public string Value { get; set; }
		}
		private void Window_Loaded( object sender, RoutedEventArgs e )
		{
			foreach( var item in Param )
				m_Param.Add( new ParamItem { Key = item.Key, Value = item.Value } );
			ltParam.ItemsSource = m_Param;
		}

		private void Window_Closed( object sender, EventArgs e )
		{
			foreach( var item in m_Param )
				Param[item.Key] = item.Value;
		}
	}
}
